<#-- @ftlvariable name="entity" type="com.xci.edu.core.entity.EduStudent" -->
<#include "/sys/_layout.ftl">
<!doctype html>
<html>
<head>
    <@pageHeader/>
</head>
<body>
<@pageLoading/>
<div class="jxpanel jx-overflow-no winpanel" data-options="fit:true">
    <div class="jxtabs jxtabs-line" data-options="{fit:true}">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#tab-basic" data-toggle="tab">基本信息</a></li>
            <li><a href="#tab-studentTrainLog" class="eduStudentTrainLog" data-toggle="tab">培训日志</a></li>
        </ul>
        <div class="tab-content">
            <div id="tab-basic" class="tab-pane jx-overflow-auto fade in active">
                <table id="basic" class="table table-bordered jxtable-details">
                    <tr>
                        <th>学员姓名</th>
                        <td>${entity.name}</td>
                        <th>性别</th>
                        <td>${entity.sex}</td>
                    </tr>
                    <tr>
                        <th>身份证号码</th>
                        <td>${entity.idNumber}</td>
                        <th>手机号码</th>
                        <td>${entity.phone}</td>
                    </tr>
                    <tr>
                        <th>科目名称</th>
                        <td colspan="3">${entity.eduCategoryName}</td>
                    </tr>
                    <tr>
                        <th>培训计划名称</th>
                        <td >${entity.planName}</td>
                        <th>已培训总学时(秒)</th>
                        <td>${entity.trainTotalPeriod}</td>
                    </tr>
                    <tr>
                        <th>地址</th>
                        <td>${entity.address}</td>
                        <th>电子邮件</th>
                        <td>${entity.email}</td>
                    </tr>
                    <tr>
                        <th>状态</th>
                        <td colspan="3">${entity.statusText}</td>
                    </tr>
                    <tr>
                        <th>备注</th>
                        <td colspan="3">${entity.remark}</td>
                    </tr>
                    <tr>
                        <th>操作人</th>
                        <td>${entity.operateUserName}</td>
                        <th>操作时间</th>
                        <td>${web.formatDateTime(entity.operateDateTime)}</td>
                    </tr>
                </table>
            </div>
            <div id="tab-studentTrainLog" class="tab-pane jx-overflow-auto fade">
                <@eduStudentTrainLog studentId="${entity.id}" />
            </div>
        </div>
    </div>
</div>
<@pageFooter/>
<script>
    /**
     * 学员培训日志Tab页初始化组件
     */
    jx.plugin({
        name: 'eduStudentTrainLog',
        defaults: { //指定插件配置选项默认值
            panelId: 'tab-studentTrainLog'
        },
        create: function (ele, ops) {
            var $ele = $(ele);
            $ele.on('shown.bs.tab', function () {
                var $this = $(this);
                if ($this.data('_student_train_log_init')) return;
                $this.data('_student_train_log_init', 1);
                var id = this.hash.substr(1);
                if (id === ops.panelId) {
                    $('.edu-tab-studentTrainLog').jxgrid({
                        url: jx.url('/background/eduStudentTrainLog/grid'),
                        cls: 'padding-5',
                        border: true,
                        fit: true
                    });
                }
            });
        }
    });
</script>
</body>
</html>
